<template>
  <div class="home-product">
    <ul>
      <li v-for="item in brandList" :key="item.id"> <img :src="item.pic_url" alt="">
        <h4>{{ item.name }}</h4>
      </li>
    </ul>
  </div>
</template>

<script setup>
import zc from '../assets/images/ybtd.jpg'
import yw from '../assets/images/ywl.jpg'
import lth from '../assets/images/lth.jpg'
import dpx from '../assets/images/dpx.jpg'
const brandList = [
  { id: 1, name: '人类一败涂地', pic_url: zc }, 
  { id: 2, name: '女神异闻录5', pic_url: yw }, 
  { id: 3, name: '艾尔登法环', pic_url: lth }, 
  { id: 4, name: '极限竞速 地平线5', pic_url: dpx }
]
</script>

<style lang="less" scoped>
.home-product>ul {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;

  li {
    width: 49.5%;
    position: relative;

    img {
      width: 100%;
      height: 180.04px;
    }

    h4 {
      font-size: 14px;
      position: absolute;
      left: 2px;
      top: -13px;
      background-color:  #ff8000;
      color: #fff;
      border-radius: 10%;
      padding: 1px 3px;
    }
  }
}
</style>